class Employee():
    def __init__(self,first_name,last_name,salary=0):
        self.first_name = first_name
        self.last_name = last_name
        self.salary = salary
    def give_raise(self,add_salary=5000):
        self.salary += add_salary
        return self.salary
import unittest
class TestEmployee(unittest.TestCase):
    def setUp(self):
        self.emp1 = Employee("a","b")
        self.emp2 = Employee("c","d",10000)
    def test_give_default_raise(self):
        default_salary = self.emp1.give_raise()
        self.assertEqual(default_salary,5000)
    def test_give_custom_raise(self):
        # emp2初始salary为10000
        self.assertEqual(self.emp2.give_raise(8000),18000)

if __name__ == '__main__':
    unittest.main()
